package com.imooc.activitiweb.listener;


import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author jzwu
 * @since 2021/3/25 0025
 */
public class MultInstancesTKListener implements TaskListener {
    private static final Logger LOGGER = LoggerFactory.getLogger(MultInstancesTKListener.class);

    @Override
    public void notify(DelegateTask delegateTask) {
        LOGGER.info("执行人={}", delegateTask.getAssignee());
        // 根据任务节点逻辑查询需要的执行人是谁
        delegateTask.setAssignee("wukong");
    }
}